import getopt
import sys


def main():
    """

    python 02_getopt.py -h 172.12.168.1 -p 8080
    python 02_getopt.py --host 172.12.168.1 --port 8080
    python 02_getopt.py --host=172.12.168.1 --port=8080
    :return:
    """
    opts, args = getopt.getopt(sys.argv[1:], 'h:p:', ['host=', 'port='])
    print(opts)
    print(args)


if __name__ == '__main__':
    main()
